package org.ns.summer.classpath.scan.io;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URL;

import org.ns.summer.classpath.scan.ScanFile;

/**
 * Jar 文件流
 *
 * @author 张星宇
 *
 * @email m.vip@qq.com
 */
public class JarScanFileIOStreamParse implements ScanFileIOStreamParse{
	
	@Override
	public InputStream getInputStream(ScanFile scanFile) throws IOException {
		URL url = new URL("jar:file:"+scanFile.getAbsolutePath());
		return url.openStream();
	}

	@Override
	public OutputStream getOutputStream(ScanFile scanFile) {
		// jar 不允许写
		return null;
	}

}
